import "./globals.css";
import type { Metadata, Viewport } from 'next';
import ConditionalLayout from '@/components/ConditionalLayout';

export const metadata: Metadata = {
  title: '仙山八骏',
  description: '仙山八骏有机茶官网首页，展示我们的有机茶产品、品牌文化和茶园介绍。源自高山生态茶园，坚持有机种植，为您提供健康优质的茶叶产品。绿茶、红茶、乌龙茶等多种有机茶产品任您选择',
  metadataBase: new URL('https://www.xsbj.cn'),
  alternates: {
    canonical: 'https://www.xsbj.cn',
  },
  openGraph: {
    siteName: '仙山八骏有机茶',
    type: 'website',
    url: 'https://www.xsbj.cn',
    title: '仙山八骏 | 有机茶官网',
    description: '源自高山生态茶园，坚持有机种植，为您提供健康优质的有机茶。',
    images: [
      {
        url: 'https://pub-d9c5812daa2b44e5b6d7b6621bbeb301.r2.dev/logo/logo_3.png',
        width: 1200,
        height: 630,
        alt: '仙山八骏 Logo',
      },
    ],
    locale: 'zh_CN',
  },
  twitter: {
    card: 'summary_large_image',
    title: '仙山八骏 | 有机茶官网',
    description: '源自高山生态茶园，坚持有机种植，为您提供健康优质的有机茶。',
    images: ['https://pub-d9c5812daa2b44e5b6d7b6621bbeb301.r2.dev/logo/logo_3.png'],
  },
};

export const viewport: Viewport = {
  width: 'device-width',
  initialScale: 1,
};

interface RootLayoutProps {
  children: React.ReactNode;
}

export default function RootLayout({ children }: RootLayoutProps) {
  return (
    <html lang="zh-CN">
      <body>
        <ConditionalLayout>
          {children}
        </ConditionalLayout>
      </body>
    </html>
  );
}